3.1.48 \(\int \frac {\cot (c+d x)}{a+a \sin (c+d x)} \, dx\) [48]

Optimal. Leaf size=32 \[ \frac {\log (\sin (c+d x))}{a d}-\frac {\log (1+\sin (c+d x))}{a d} \]

[Out]

ln(sin(d*x+c))/a/d-ln(1+sin(d*x+c))/a/d

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {2786, 36, 29, 31} \begin {gather*} \frac {\log (\sin (c+d x))}{a d}-\frac {\log (\sin (c+d x)+1)}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

Log[Sin[c + d*x]]/(a*d) - Log[1 + Sin[c + d*x]]/(a*d)

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 2786

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[x^p*((a + x)^(m - (p + 1)/2)/(a - x)^((p + 1)/2)), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& EqQ[a^2 - b^2, 0] && IntegerQ[(p + 1)/2]

Rubi steps

\begin {align*} \int \frac {\cot (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\text {Subst}\left (\int \frac {1}{x (a+x)} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x} \, dx,x,a \sin (c+d x)\right )}{a d}-\frac {\text {Subst}\left (\int \frac {1}{a+x} \, dx,x,a \sin (c+d x)\right )}{a d}\\ &=\frac {\log (\sin (c+d x))}{a d}-\frac {\log (1+\sin (c+d x))}{a d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 32, normalized size = 1.00 \begin {gather*} \frac {\log (\sin (c+d x))}{a d}-\frac {\log (1+\sin (c+d x))}{a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

Log[Sin[c + d*x]]/(a*d) - Log[1 + Sin[c + d*x]]/(a*d)

________________________________________________________________________________________

Maple [A]
time = 0.11, size = 27, normalized size = 0.84

method result size
derivativedivides \(\frac {\ln \left (\sin \left (d x +c \right )\right )-\ln \left (1+\sin \left (d x +c \right )\right )}{a d}\) \(27\)
default \(\frac {\ln \left (\sin \left (d x +c \right )\right )-\ln \left (1+\sin \left (d x +c \right )\right )}{a d}\) \(27\)
risch \(-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{a d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d a}\) \(42\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/a/d*(ln(sin(d*x+c))-ln(1+sin(d*x+c)))

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 31, normalized size = 0.97 \begin {gather*} -\frac {\frac {\log \left (\sin \left (d x + c\right ) + 1\right )}{a} - \frac {\log \left (\sin \left (d x + c\right )\right )}{a}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

-(log(sin(d*x + c) + 1)/a - log(sin(d*x + c))/a)/d

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 28, normalized size = 0.88 \begin {gather*} \frac {\log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) - \log \left (\sin \left (d x + c\right ) + 1\right )}{a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(log(1/2*sin(d*x + c)) - log(sin(d*x + c) + 1))/(a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\cot {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

Integral(cot(c + d*x)/(sin(c + d*x) + 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 9.18, size = 33, normalized size = 1.03 \begin {gather*} -\frac {\frac {\log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{a} - \frac {\log \left ({\left | \sin \left (d x + c\right ) \right |}\right )}{a}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

-(log(abs(sin(d*x + c) + 1))/a - log(abs(sin(d*x + c)))/a)/d

________________________________________________________________________________________

Mupad [B]
time = 6.53, size = 32, normalized size = 1.00 \begin {gather*} \frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )-2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )}{a\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(c + d*x)/(a + a*sin(c + d*x)),x)

[Out]

(log(tan(c/2 + (d*x)/2)) - 2*log(tan(c/2 + (d*x)/2) + 1))/(a*d)

________________________________________________________________________________________